import java.util.Arrays;
public class Test9{
    public static void main(String[] args) {
        int[] a = {12,62,53,74,8};
        int num1 = Arrays.binarySearch(a,53);
        int num2 = Arrays.binarySearch(a,2,4,74);
        if (num1>0){
            System.out.println("53的位置: "+ num1);
        }else {
            System.out.println("53不在数组中");
        }
        if (num2>0){
            System.out.println("74的位置: "+ num2);
        }else {
            System.out.println("74不在数组中");
        }
    }
}